xen: Introduce an xmemdup() helper
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 5 Jul 2018 14:19:00 +0000 (14:19 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 9 Jul 2018 13:02:58 +0000 (14:02 +0100)
commit298253b676a86ccdbc9b1a5f2bfe31dc6d7dd327
treeee3d3ea0d9397950b15786c1115f5b4f40fa535e
parent28ca696a3e5cf464be945477a986576eec644c61
xen: Introduce an xmemdup() helper

... and use it in place of the opencoded instances.

For consistency, restructure init_domain_cpuid_policy() to be like
init_{domain,vcpu}_msr_policy() by operating on the local pointer where
possible.

No change in behaviour.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpuid.c
xen/arch/x86/msr.c
xen/include/xen/xmalloc.h